from http.client import responses

from openai import OpenAI
import os

from pyexpat.errors import messages

api_key = os.getenv("OPENAI_API_KEY")
base_url = os.getenv("OPENAI_API_BASE_URL")
timeout=120

client = OpenAI(api_key=api_key, base_url=base_url, timeout=timeout)
messages = [{"role":"user", "content":"介绍一下你自己"}]

response = client.chat.completions.create(model="gpt-3.5-turbo", messages=messages)

print( response )


